import request from '@/utils/request'

// 创建渠道标识
export function createCpsSource(data) {
  return request({
    url: '/alipay/cps-source/create',
    method: 'post',
    data: data
  })
}

// 更新渠道标识
export function updateCpsSource(data) {
  return request({
    url: '/alipay/cps-source/update',
    method: 'put',
    data: data
  })
}

// 删除渠道标识
export function deleteCpsSource(id) {
  return request({
    url: '/alipay/cps-source/delete?id=' + id,
    method: 'delete'
  })
}

// 获得渠道标识
export function getCpsSource(id) {
  return request({
    url: '/alipay/cps-source/get?id=' + id,
    method: 'get'
  })
}

// 获得渠道标识分页
export function getCpsSourcePage(query) {
  return request({
    url: '/alipay/cps-source/page',
    method: 'get',
    params: query
  })
}

// 导出渠道标识 Excel
export function exportCpsSourceExcel(query) {
  return request({
    url: '/alipay/cps-source/export-excel',
    method: 'get',
    params: query,
    responseType: 'blob'
  })
}
